package org.ruiyichen.guizhou.agr.ui.fragment;

import org.ruiyichen.guizhou.agr.base.BaseFragment;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;


public class BaseFragmentPageAdapter extends /*FragmentStatePagerAdapter*/FragmentPagerAdapter {
	//存储所有的fragment
	private BaseFragment[] list;
	
	public BaseFragmentPageAdapter(FragmentManager fm, BaseFragment[] list){
		super(fm);
		this.list = list;
	}

	@Override
	public Fragment getItem(int position) {
		return list[position];
	}

	@Override
	public int getCount() {
		return list.length;
	}

}
